//
//  currentWorkSetManager.h
//  dataGathering
//
//  Created by apple on 14/11/17.
//  Copyright (c) 2014年 shuili. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FMDB.h"
#import "workSet.h"
#import "LocalLayerListModel.h"


@interface currentWorkSetManager : NSObject{
    sqlite3 *_db;
}

+ (currentWorkSetManager*) sharedInstance;

-(void)reloadWorksetInfo;

-(void)setCurrentWorkSet :(NSString*)name;
-(void)markWorksetToDelete;
-(void)deleteCurrentWorkSet;
-(void)confirmDeleteWorkSet: (workSet*)worksetToDelete;

-(NSArray*)getWorksetArray;
-(workSet*)getCurrentWorkSet;
-(void)updateCurrentWorkSet :(workSet*)editedWorkset;
-(BOOL)addNewWorkset :(NSString*)name :(NSString*)description;
-(BOOL)updateWorksetNameAndDesc :(NSString*)worksetName :(NSString*)worksetDesc;

-(void)updateIsAutoSync :(NSString*)worksetName :(BOOL)isAutoSync;
-(void)updateIsTracking :(NSString*)worksetName :(BOOL)isTracking;
-(void)updateIsOnlineLayerDisplayed :(NSString*)worksetName :(BOOL)isOnlineLayerDisplayed;
-(void)updateIsCompleted :(NSString*)worksetName :(BOOL)isCompleted;
-(void)addCollectedData :(NSString*)worksetName :(collectedData*)newdata;
-(void)removeCollectedData :(NSString*)worksetName :(collectedData*)data;

-(void)updateCollectedData :(collectedData*)cData :(NSString*)oldName newName:(NSString*)newDataName newDescription:(NSString*)newDesc newImgArray:(NSArray*)newArray;

-(void)updateCollectedData :(collectedData*)newdata :(AGSGeometry*)newGeometry :(NSString*)newMainType :(NSString*)newType;

-(LocalFeatureModel*)getLocalFeatureModel;
@end
